package com.dxj1992.controller.home;

import com.dxj1992.service.IAdminUsersService;
import com.dxj1992.utils.UserAsset.Asset;
import com.dxj1992.utils.UserAsset.AssetEnum;
import com.dxj1992.utils.UserAsset.Expend;
import com.dxj1992.utils.UserAsset.Income;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author jobob
 * @since 2022-05-25
 */
@RestController
@RequestMapping("/User/user")
public class UserController {
    @Autowired
    private IAdminUsersService iAdminUsersService;

    @GetMapping("")
    @Transactional(rollbackFor = {Exception.class})
    public void index() throws Exception {
        long l = System.currentTimeMillis() * 1000;
        Asset income = new Income();
        income.init(1L, AssetEnum.INCOME.getSubType(), "222", 2.0, "测试");
        long l1 = System.currentTimeMillis() * 1000;
        System.out.println(l1 - l);

        Asset expend = new Expend();
        expend.init(1L, AssetEnum.Expend.getSubType(), "222", 2.0, "测试");
    }
}
